package com.wf.provider;

import com.wf.entity.PageInfo;
import com.wf.entity.Userinfo;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * Created by yuzhongbo on 2017/5/3.
 */
@Component
@FeignClient("wf-provider")
public interface UserinfoProvider {

    @LoadBalanced
    @RequestMapping(value="/userinfo/getUserList/{name}", method=RequestMethod.GET)
    public List<Userinfo> getUserList(@PathVariable(value = "name") String name);

    @LoadBalanced
    @RequestMapping(value="/userinfo/getUserListTwo", method=RequestMethod.POST)
    public PageInfo<Userinfo> getUserListTwo(@ModelAttribute(value = "userinfo") Userinfo userinfo);
}
